\name{bacom}
\alias{bacom}
\title{Bayesian analysis of copy number mixtures for DNA copy number data}
\description{
'bacom' calls Java class Noticcor to perform normal tissue contamination
correction using Bayesian analysis of copy number mixtures (BACOM).
}
\usage{
bacom(chrID, copyNumber, alleleA, alleleB, isGenotypeAB, segMean)
}
\arguments{
\item{chrID}{a character vector of chromosome ID, the same length as
  copyNumber.} 
\item{copyNumber}{a numeric vector of DNA copy numbers (the normal
  segments have mean 2).}
\item{alleleA}{a numeric vector of allele A, the same length as
  copyNumber.}
\item{alleleB}{a numeric vector of allele B, the same length as
  copyNumber.}
\item{isGenotypeAB}{a boolean vector indicating whether the
  corresponding loci are genotype AB, the same length as copyNumber.} 
\item{segMean}{a numeric vector of segment means, the same length as
  copyNumber.} 
}

\value{
'bacom' returns the estimated fraction of normal cells in the sample.
}

\note{
'bacom' requires R package \code{'rJava'} and Java Virtual Machine installed
and configurated properly. \code{rJava} can be installed as any other R package
from CRAN using \code{install.packages('rJava')}. \code{rJava} requires
JDK 1.4 or higher to be installed. For \code{rJava} installation
details, please refer to: \url{http://www.rforge.net/rJava/index.html}.
}

\examples{
alpha <- bacom(chrID, copyNumber, alleleA, alleleB, isGenotypeAB, segMean)
}

\references{
G. Yu, B. Zhang, J. Xu, G. S. Bova, I-M Shih, Y. Wang, "Accurate Estimation of Genomic Deletions and Normal Cell Contamination by Bayesian Analysis of Copy Number Mixtures", submitted to \emph{Bioinformatics}.
  
G. Yu, B. Zhang, J. Xu, I.-M. Shih, and Y. Wang, "Accurate Estimation of Genomic Deletions and Normal Cell Contamination by Bayesian Analysis of Mixtures", \emph{Proc. IEEE Intl Conf. on Bioinformatics & Biomedicine}, Washington D.C., USA, Nov. 2009.

}
